﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace ISFProject.Models
{
    public class Address
    {
        [Key]
        public int AdressId { get; set; }

        [Required(ErrorMessage = "name is missing")]
        [StringLength(120, MinimumLength = 3, ErrorMessage = "Invalid fieldlength")]
        public string StreetName { get; set; }
        [Required(ErrorMessage = "name is missing")]
        [Range(1,9000)]
        public int Number { get; set; }

        [ForeignKey("City")]
        public int CityId { get; set; }
        public virtual City City { get; set; }

        public virtual List<School> School { get; set; }
        public virtual List<NSSF> NSSF { get; set; }
        public virtual List<Meeting> Meeting { get; set; }
       

    }
}